package controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import service.KF2;

@RestController
@RequestMapping("KF")
public class KfController {
    @Autowired
    private KF2 kf2;
    @GetMapping("answer")
    public String kF(@RequestParam("question") String question){
        String answer = kf2.getAnswer(question);
        System.out.print(question);
        return answer;
    }
}
